#include <iostream>
#include <string>
#include <vector>

using namespace std;

class Solution {
public:
    int maxPower(string s) {
        int curNum = 1;
        int maxNum = curNum;
        for (int idx = 1; idx < s.length(); idx++) {
            if (s[idx] == s[idx - 1]) {
                curNum++;
                maxNum = max(maxNum, curNum);
                continue;
            }
            curNum = 1;
        }
        return maxNum;
    }
};

int main()
{
    Solution s;
    string str = "cc";
    cout << s.maxPower(str) << endl;

    return 0;
}